<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function fun(){
				console.log(this);
			}			
			//以方法的形式调用
			var animal1={
				name:"dog", 
				age:4, 
				color:"white",
				say:fun
			}
			var animal2={
				name:"cat", 
				age:4, 
				color:"yellow",
				say:fun
			}
			fun();			 //以函数的形式调用，this指向window
			animal1.say();   //以方法的形式调用，this指向animal1
			animal2.say();   //以方法的形式调用，this指向animal2
		</script>
	</head>
	<body>
	</body>
</html>
